Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Rally: support altitude frames #25380

Merged
merged 5 commits into from
Nov 1, 2023
Merged

Conversation

IamPete1
Copy link
Member

This work is sponsored by Spektreworks.

This adds support for alt frames in rally points. There were some free bits in "flags" that we can use. This assumes that those unused bits are zero. It is possible that they are none zero in storage if uploaded with the old RALLY_POINT MAVLink message.

Tested conversion from old format, all alt frames manually on plane and added new method to the existing TerrainRally plane test.

@WickedShell
Copy link
Contributor

This is strongly desired from a urgent need to get support for absolute or relative rally points supported. A later change that let us have full missions in rally points would be quite interesting, but we'd like to get this in now, and this should be no impact for existing ground stations as we never had assigned a value to those flag bits in the XML. (Out of spec of course is a different story).

@rmackay9
Copy link
Contributor

If the rally point alt frame is set to terrain does a copter actually follow the terrain to the rally point or does it fly a straight line to the absolute altitude (which matches the specified alt-above-terrain)?

@IamPete1
Copy link
Member Author

@rmackay9 Your correct, on copter it flys to the abs altitude and then flys the return based on the RTL_ALT_TYPE parameter. To do it completely we would need a extra variable to know if the returned point is home. If were flying home then we would use RTL_ALT_TYPE to set the alt frame if flying to a rally point we would use the provided alt frame.

I was going to chalk that up as a future improvement, but I could add it to this PR if you prefer.

@rmackay9
Copy link
Contributor

@IamPete1, Ah, OK. Let's not let perfection be the enemy of the good..

tridge
tridge previously requested changes Oct 31, 2023
libraries/AP_Rally/AP_Rally.h Show resolved Hide resolved
@IamPete1 IamPete1 dismissed tridge’s stale review October 31, 2023 00:37

Added padding uint8_t unused : 3

@IamPete1 IamPete1 requested a review from tridge October 31, 2023 00:37
@tridge tridge merged commit 935ea02 into ArduPilot:master Nov 1, 2023
86 checks passed
@IamPete1 IamPete1 removed the DevCallEU label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants